package cn.rxls.community.controller;


import cn.rxls.community.dto.houses.HousesPageCommunityDTO;
import cn.rxls.community.result.Result;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import cn.rxls.community.entity.Houses;
import cn.rxls.community.service.HousesService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.io.Serializable;
import java.util.List;

/**
 * 房屋(Houses)表
 */
@RestController
@RequestMapping("houses")
public class HousesController {
    /**
     * 服务对象
     */
    @Resource
    private HousesService housesService;

    /**
     * 根据地域分页查询房屋信息
     *
     * @param dto 参数对象
     * @return 多条房屋信息
     */
    @GetMapping("/page/region")
    public Result<?> selectPageByRegion(@ModelAttribute @Valid HousesPageCommunityDTO dto) {
        return Result.success(housesService.selectPageByRegion(dto));
    }

}

